﻿@{
    ViewBag.Title = "RepareInfo";
    Layout = "~/Views/Shared/_Layout.cshtml";
    Fcom.VNInsurance.Web.Models.CusSmalInfo CusInfo=null;
    if(Session["CusSmalInfo"]!=null)
    {
        CusInfo =(Fcom.VNInsurance.Web.Models.CusSmalInfo)Session["CusSmalInfo"];
    }
}

<h2>Tạo tài khoản</h2>
<label>Loading...</label>
<div style="display:none">
   @if (CusInfo != null)
   { 
       <p>
           <span id="fullname">@CusInfo.FullName</span>
           <span id="email">@CusInfo.Email</span>
           <span id="phone">@CusInfo.Phone</span>
           <script>
               $(document).ready(function () {
                   $.ajax({
                       type: "post",
                       url: $("#AppUrl").html() + "/Account/ajRegister",
                       data: { email: $("#email").html(), phone: $("#phone").html(), fullname: $("#fullname").html() },
                       datatype: "json",
                       success: function (rvdata)
                       {
                           if (rvdata.success) {
                               window.location = $("#AppUrl").html() + "/Moto/Motobike";
                           }
                           else {
                               rvdata.success;
                           }
                       }   
                       });
               });
           </script>
       </p>
   }
</div>
